package com.bms.cfcmms.scheduler;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.dataflow.DataflowJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by carl on 2017/3/15.
 */
public class DataflowElasticJob implements DataflowJob {

    private static final Logger log = LoggerFactory.getLogger(DataflowElasticJob.class);

    @Override
    public List<Integer> fetchData(ShardingContext shardingContext) {
        List<Integer> lists = new ArrayList<>();
        lists.add(11);
        return lists;
    }

    @Override
    public void processData(ShardingContext shardingContext, List list) {
        log.info("DataflowElasticJob list.size is:" + list.size());
    }
}
